/**************************************************************************************** Import */
import React from 'react';
import CHand from '../../library/comp/system/contain/hand';
import CText from '../../library/comp/system/element/text';
import icon from '../../design/icon/icon';
import { CIcon } from '../../library/comp';

/**************************************************************************************** Object */
export default {

    /**
     * 默认状态
     */
    default: {

        // 加载状态
        loading() {
            return (
                <CHand f='1' x='center' y='center'>
                    
                </CHand>
            );
        },

        // 空数据状态
        empty() {
            return (
                // 购物车空 
                <CHand f='1' x='center' y='center'>
                    <CColumn x='center' y='center' bg='#fff' style={{marginTop:-40}}>
                        {/* 暂用loading代替 */}
                        <CIcon icon={icon["loading"]} w='160' h='160' color='#cdcdcd' mb='40' />
                        <CText size='26' color='#8d8d8d' mb='40'>购物车是空的</CText>
                        <CButton ba='1 #d7d7d7' ra='3' w='180' color='#8d8d8d' py='5' px='15' size='24'>去逛逛</CButton>
                    </CColumn>
                </CHand>
                // 没有消息
                // <CHand f='1' x='center' y='center'>
                //     <CColumn x='center' y='center' bg='#fff' style={{marginTop:-160}}>
                //         <CIcon icon={icon["loading"]} w='160' h='160' color='#cdcdcd' mb='40' />
                //         <CText size='26' color='#8d8d8d' mb='40'>这里还没有任何消息哦</CText>
                //     </CColumn>
                // </CHand>
            );
        },
        
        // 错误状态
        error() {
            return (
                // 加载失败
                <CHand f='1' x='center' y='center'>
                    <CColumn x='center' y='center' bg='#fff' style={{marginTop:-80}}>
                        <CHand w='160' h='160' ba='3 dashed #cfcfcf' ra='80' x='center' y='center' mb='70'>
                            <CText size='24' color='#8d8d8d'>加载失败</CText>
                        </CHand>
                        <CButton ba='1 #d7d7d7' ra='3' w='180' color='#8d8d8d' py='5' px='15' size='24'>重新加载</CButton>
                    </CColumn>
                </CHand>
                // 系统错误
                // <CHand f='1' x='center' y='center'>
                //     <CColumn x='center' y='center' bg='#fff' style={{marginTop:-60}}>
                //         {/* 暂用loading代替 */}
                //         <CIcon icon={icon["loading"]} w='160' h='160' color='#cdcdcd' mb='40' />
                //         <CText size='26' color='#8d8d8d' mb='40'>系统错误</CText>
                //         <CButton ba='1 #d7d7d7' ra='3' w='180' color='#8d8d8d' py='5' px='15' size='24'>重新加载</CButton>
                //     </CColumn>
                // </CHand>
            );
        },
        
        // 未在线状态
        offline() {
            return (
                <CHand f='1' x='center' y='center'>
                    <CColumn x='center' y='center' bg='#fff'>
                        <CIcon icon={icon["loading"]} w='160' h='160' color='#cdcdcd' mb='40' />
                        <CText size='26' color='#8d8d8d' mb='20'>网络请求失败</CText>
                        <CText size='22' color='#c5c5c5' mb='3'>请检查您的网络</CText>
                        <CText size='22' color='#c5c5c5' mb='40'>重新加载吧</CText>
                        <CButton ba='1 #d7d7d7' ra='3' w='180' color='#8d8d8d' py='5' px='15' size='24'>重新加载</CButton>
                    </CColumn>
                </CHand>
            );
        }
    } 
}
